package org.jeecg.modules.demo.hd.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.demo.hd.entity.AppUserCashDetail;
import org.jeecg.modules.demo.hd.mapper.AppUserCashDetailMapper;
import org.jeecg.modules.demo.hd.service.IAppUserCashDetailService;
import org.jeecg.modules.demo.hd.vo.myProject.UserCashDetailVo;
import org.jeecg.modules.demo.hd.vo.total.ChildUserGoldViewVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @Description: 用户现金明细
 * @Author: jeecg-boot
 * @Date: 2025-04-19
 * @Version: V1.0
 */
@Service
public class AppUserCashDetailServiceImpl extends ServiceImpl<AppUserCashDetailMapper, AppUserCashDetail> implements IAppUserCashDetailService {


    @Override
    @Transactional
    public String addDetail(UserCashDetailVo vo) {
        AppUserCashDetail model = new AppUserCashDetail();
        BeanUtils.copyProperties(vo, model);
        model.setBonusTime(DateUtils.getDate());
        this.baseMapper.insert(model);
        return null;
    }

    @Override
    public void clean() {
        this.baseMapper.delete(null);
    }


}
